Skip to content

Make UI test checks poll with WaitFor instead of fixed sleeps - #6

Open
jay23606 wants to merge 1 commit into
CBlockDigital:mainfrom
jay23606:pr-go/1-make-the-app-s-ui-tests-wait-by-polling-
Open

jay23606 wants to merge 1 commit into
CBlockDigital:mainfrom
jay23606:pr-go/1-make-the-app-s-ui-tests-wait-by-polling-

Conversation

@jay23606

@jay23606 jay23606 commented Nov 2, 2026

Copy link
Copy Markdown

Bug

Four checks in the headless UI test (Production/RAMMIT-Stable/Tests/TestUi.mjs) waited a fixed number of milliseconds before looking at the page. On a busy PC they could fail before the app caught up: Light theme loads, settings saved, selection persisted by username and settings fold away.

Change

  • Those four checks now poll with WaitFor(...), the existing helper that retries until the condition holds (default 5000 ms).
  • Light uses its own stylesheet also polls now. It ran right after the Light theme loads check, which lost its fixed 900 ms wait, so it could have read the stylesheet too early.
  • TestUiWaits.py is a regression test. It fails if any of these checks lacks WaitFor( or has a fixed Wait( between it and the previous check.

Testing

  • python Production/RAMMIT-Stable/Tests/TestUiWaits.py -v: passes on the fix.
  • The same test against the base commit's TestUi.mjs: fails on all five checks.
  • python -m pyflakes Production/RAMMIT-Stable/Tests/TestUiWaits.py: clean.
  • Not run: the headless UI suite itself (needs Node, puppeteer-core and Chrome) and the busy-PC runs the issue asks for.

Regression test: fails on base twice (/does not poll with WaitFor|still has a fixed Wait()/), passes on fix twice (python Production/RAMMIT-Stable/Tests/TestUiWaits.py)

Fixes #1

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the app's UI tests wait by polling, not fixed sleeps

1 participant